package kr.hkit.info.powerjava.ch14.lab.StudentScore;


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 * Input Class
 *
 */
public class InputUI extends JPanel {
	private JLabel lbl;
	private JTextField tf;
	
	public InputUI(String title){
		setLayout(new GridLayout(0, 2));
		lbl = new JLabel(title);
		tf = new JTextField(10);
		add(lbl);
		add(tf);
	}
	public void setup()
	{
	    setBorder(BorderFactory.createLineBorder(Color.blue));
	    setLayout(new BorderLayout(1, 1));
	    setPreferredSize(new Dimension(350, 190));
	}
	public JLabel getLbl() {
		return lbl;
	}

	public void setLbl(JLabel lbl) {
		this.lbl = lbl;
	}

	public JTextField getTf() {
		return tf;
	}

	public void setTf(JTextField tf) {
		this.tf = tf;
	}
	
	public void reset(){
		tf.setText("");
	}	
}
